package com.bayes.teamshow.service;

import com.bayes.teamshow.dao.UserRegi;
import com.bayes.teamshow.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserImpl {

    @Autowired
    UserRegi userRegi;


    public List<User> getUser(){
        return userRegi.findAll();
    }

    public User findUser(User user) {

        return userRegi.findByNameAndPasswd(user.getName(), user.getPasswd());
    }
}
